<template>
  <div>
    <Row :gutter="10">
      <Col span="12">
        <Card :bordered="false" :dis-hover="true">
          <p slot="title">
            <Icon type="ios-browsers-outline"></Icon>
            折扣大类
          </p>
          <big-class-list ref="bigClassList" :homeId="homeId" v-on="{refreshSmallClassList:refreshSmallClassList}"></big-class-list>
        </Card>
        <Card :bordered="false" :dis-hover="true">
          <p slot="title">
            <Icon type="ios-browsers-outline"></Icon>
            折扣小类
          </p>
          <small-class-list ref="smallClassList" :homeId="homeId" v-on="{refreshProductList:refreshProductList}"></small-class-list>
        </Card>
        <Card :bordered="false" :dis-hover="true">
          <p slot="title">
            <Icon type="ios-browsers-outline"></Icon>
            折扣产品
          </p>
          <product-list ref="productList" :homeId="homeId"></product-list>
        </Card>
      </Col>
    </Row>
  </div>
</template>

<script>
    import bigClassList from '@/view/basic/info/list/DiscountProductBigClassList.vue';
    import smallClassList from '@/view/basic/info/list/DiscountProductSmallClassList.vue';
    import productList from '@/view/basic/info/list/DiscountProductList.vue'
    export default {
        components: {
            bigClassList,
            smallClassList,
            productList
        },
        props: {
            homeId: {
                type: Number,
                default: -1
            }
        },
        data () {
            return {
            };
        },
        methods: {
            init () {

            },
            refresh () {
                this.refreshBigClassList()
                this.refreshSmallClassList()
                this.refreshProductList()
            },
            refreshBigClassList () {
                this.$refs.bigClassList.refresh()
            },
            refreshSmallClassList () {
                this.$refs.smallClassList.refresh()
            },
            refreshProductList () {
                this.$refs.productList.refresh()
            }
        },
        mounted () {
        }
    }
</script>

<style>

</style>
